webr-demo
WebR
This document demonstrates the webR package for the #rstats community. Using it, in conjunction with the quarto-webr Quarto extension, users can create Quarto documents with code that runs at runtime instead of during document rendering.
This code runs entirely in the browser – no R interpreter is needed, because webR runs the R interpreter in the browser, using WebAssembly.
Among other things, this allows researchers to create tools to explore data. Here we’ll graph the line \[y = mx + b\] By changing the slope and y-intercept, we can illustrate how the line changes.
- Click the
Run Codebutton to draw the liney = x. - Adjust the values of
bandmon lines 3 and 4 below to specify a new line. - Click
Run Codeto see how the line changes.